}
static void
-gtk_image_reset (GtkImage *image)
+gtk_image_notify_for_storage_type (GtkImage *image,
+ GtkImageType storage_type)
{
- GtkImagePrivate *priv = image->priv;
- GtkImageType storage_type;
-
- g_object_freeze_notify (G_OBJECT (image));
- storage_type = gtk_image_get_storage_type (image);
-
- if (storage_type != GTK_IMAGE_EMPTY)
- g_object_notify_by_pspec (G_OBJECT (image), image_props[PROP_STORAGE_TYPE]);
-
- g_object_notify_by_pspec (G_OBJECT (image), image_props[PROP_ICON_SIZE]);
-
switch (storage_type)
{
case GTK_IMAGE_PIXBUF:
g_object_notify_by_pspec (G_OBJECT (image), image_props[PROP_ICON_SET]);
break;
case GTK_IMAGE_ANIMATION:
- gtk_image_reset_anim_iter (image);
g_object_notify_by_pspec (G_OBJECT (image), image_props[PROP_PIXBUF_ANIMATION]);
break;
case GTK_IMAGE_ICON_NAME:
default:
break;
}
+}
+
+static void
+gtk_image_reset (GtkImage *image)
+{
+ GtkImagePrivate *priv = image->priv;
+ GtkImageType storage_type;
+
+ g_object_freeze_notify (G_OBJECT (image));
+ storage_type = gtk_image_get_storage_type (image);
+
+ if (storage_type != GTK_IMAGE_EMPTY)
+ g_object_notify_by_pspec (G_OBJECT (image), image_props[PROP_STORAGE_TYPE]);
+
+ g_object_notify_by_pspec (G_OBJECT (image), image_props[PROP_ICON_SIZE]);
+
+ gtk_image_reset_anim_iter (image);
+
+ gtk_image_notify_for_storage_type (image, storage_type);
if (priv->filename)
{